Robust R-AP algorithm